.sub-section
  %h4.warning-title= _('Insights')
  %p
    = s_('GroupSettings|Select the project containing your custom Insights file.')
    = link_to(s_('GroupSettings|What is Insights?'), help_page_path('user/group/insights/index.md'), target: '_blank', rel: 'noopener noreferrer')

  .settings-content
    = gitlab_ui_form_for @group, html: { class: 'fieldset-form', data: { testid: 'insights-settings' } } do |form|
      = form_errors(@group)

      - insight = @group.insight || @group.build_insight
      = form.fields_for :insight_attributes, insight do |insight_form|
        = insight_form.hidden_field :id
        .js-vue-project-select{ data: { label: html_escape(s_('GroupSettings|Select the project containing the %{code_start}.gitlab/insights.yml%{code_end} file')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe },
          has_html_label: true.to_s,
          input_name: 'group[insight_attributes][project_id]',
          input_id: 'group_insight_attributes_project_id',
          group_id: @group.id,
          order_by: 'last_activity_at',
          with_shared: true.to_s,
          include_subgroups: true.to_s,
          selected: insight.project_id } }
      = form.submit _('Save changes'), pajamas_button: true
